package opos;

public class Utils {
	
	public static String clean(String input) {
//		System.out.println("clean input["+input+"]");
		return input.substring(input.indexOf("=") - 4);
	}

	public static String clean2(String input) {
		return input.substring(input.indexOf("=") + 1);
	}
	
	public static String clean3(String e) {
		return (e.substring(e.indexOf(")") + 1));
	}
	
	public static String cleanSolucion(String input){
		// input example ' answers[1] = choices[1][1];'
		 input = input.substring(input.lastIndexOf("["));
		 input = input.replace("[", "");
		 input = input.replace("]", "");
		 input = input.replace(";", "");
		 return input;
	}
	
}
